Linux Power-On Startup

Power On

Configure the development board's boot mode to SD card boot, and insert the TF card into the card slot.

Connect the PS_NET Ethernet port on the development board to the local area network where the development environment is located, or directly connect it to the computer host using an Ethernet cable.

Connect the PS_UART serial port of the development board to the host, and power on the board.

We can see the board's startup information on the corresponding serial port through the host's serial debugging assistant:

image-20250710102022244

Change IP to Static IP

Modify IP Address During Packaging

By modifying the project-spec/configs/init-ifupdown/interfaces file, the IP in /etc/network/interfaces packaged into the file system becomes a static IP.

Modify IP After System Startup

There are two methods to change the IP address to a static IP: one is to set it as a static IP when packaging with petalinux into the file system, and the other is to modify it after the system starts up.

The PS_NET Ethernet port on the development board corresponds to eth0, and the PL_NET Ethernet port corresponds to eth1.

The default IP allocation method for eth0 is DHCP. If you want a fixed IP address, you can edit the /etc/network/interfaces file through the console serial port corresponding to PS_UART to configure the network port as a static IP address. This way, you can later log in to the development board via telnet.

Configure eth0 with the desired IP address. Here it is configured as 192.168.3.184.

 

Enable FTP and Telnet

To facilitate file transfer and login between the host and the development board, you can enable the FTP and telnet functions on the development board.

Enable FTP

To enable the FTP server function on the development board, you need to enable the -w option during Busybox Configuration:

image-20250715161139065

On the computer, use FileZilla software to connect to the development board's FTP server. If the -w option is not enabled, an error will occur.

Configure Telnet and FTP

There are also two ways to enable telnet and FTP functions: one is to modify the corresponding configuration to the desired settings when packaging into the file system; the other is to modify the configuration files after the system starts.

Modify Configuration Files During Packaging

If the project-spec/meta-user/recipes-core/busybox directory does not have the busybox_%.bbappend file and the busybox folder as shown in the figure below, you need to create the busybox_%.bbappend file and the busybox folder, and create the document inetd.conf in the busybox folder.

image-20250821101618708

The content of inetd.conf is as follows:

If the busybox_%.bbappend file already exists, add the following content to this file:

If there is no busybox_%.bbappend file, create a busybox_%.bbappend document with the following content:

Then proceed with build and package using petalinux.

Modify Telnet and FTP Configuration After System Startup

After the system starts, you can edit the /etc/inetd.conf file through the console serial port.

Change the last two lines to the following content:

After the development board is powered on and the network connection is normal, open the command prompt on the computer and enter telnet 192.168.3.184 to access the development board. If prompted for a username and password, the default username and password are both root. You can also use an FTP tool to upload files to or download files from the development board.

Preliminary Network Testing

On the console serial port, enter the "ifconfig" command to view the IP: IP address: 192.168.3.184

image-20250710103301714

Ping from the host can communicate normally. This indicates that the network is functioning properly. TODO: Replace with a screenshot of pinging 192.168.3.184.

image-20250710104831652

The Ethernet port corresponding to PL_NET is eth1. You can set the IP of eth1 using the command "ifconfig eth1 +IP address":

image-20250709115143850

However, eth1 cannot be pinged at this time. This is because the two network ports on the development board are configured on the same subnet, and the system routes by default through eth0. Therefore, to ping eth1, you must first disconnect the connection of network port 0 and enable network port 1 using commands, or configure eth1 to a different subnet.

image-20250709120148003

Now it can be pinged:

image-20250710104410279